import { prop } from '@typegoose/typegoose'
import { EntityModel } from '@midwayjs/typegoose'

@EntityModel()
export class User {
  @prop({ unique: true })
  public id: string

  @prop({ unique: true })
  public username: string

  @prop()
  public password: string

  // 角色id数组
  @prop()
  public roles: string[]

  @prop()
  public nickname: string

  @prop()
  public department: string

  @prop()
  public position: string
}
